<html>
<head>
<style>
@page  {
  size: 100px 100px;
  margin: 0;
}
body {
  margin: 0;
  width: 100px;
  height: 100px;
}
</style>
</head>
<body>
<div style="padding: 20%; border: 1px solid blue; width: 100%; box-sizing: border-box;">
  <div style="width: 100%; background-color: red; height: 25px;"></div>
</div>
</body>
</html>
